<?php

$homePath = 'Home'; // 路由项目路径

$home = array(
    'namespace' => $homePath,
    'middleware' => ['web']
);

$login= array(
    'namespace' => $homePath,
    'middleware' => ['web','login']
);

Route::group($home, function () {
    Route::get('register','RegisterController@getRegister');//用户注册
    Route::post('doregister','RegisterController@postRegister');
    Route::get('login','LoginController@getLogin');//用户登录
    Route::post('dologin','LoginController@postLogin');

    Route::get('captcha', function()
    {
        return generate_captcha();
    });
});

// 需要验证登录状态的路由组
Route::group($login,function () {
    Route::get('/','MemberController@getIndex');//用户资料
    Route::Controller("manage", "ManageController"); // 充值模块
    Route::Controller("myedu", "MyeduController"); // 我的edu
    Route::Controller("group", "GroupController"); // 组团
    Route::get('logout','LoginController@getLogout');//退出
    Route::get('pass','MemberController@getEdpass');//密码修改
    Route::post('dopass','MemberController@postEdpass');
    Route::post('domember','MemberController@postIndex');
    Route::get('invite','InviteController@getInvite');//邀请链接
    Route::get('invited','InviteController@getInvited');//成功邀请
    Route::get('invitejl','InviteController@getInvitjl');//邀请奖励
    Route::get('tgorder','MemberController@getTgorder'); //推广排行

});

    Route::post('home/ajax','Home\InviteController@postZxjinvited'); //ajax成功邀请